@import './style/base.scss';
@import './style/animate.scss';
@import './style/icon.scss';
@import './style/footer.scss';
@import './style/button.scss';
@import './style/input.scss';
@import './style/textarea.scss';
@import './style/loading.scss';

.container {
  background-color: var(--color-background);
  min-height: 100vh;
  &.split {
    padding-top: 20px;
  }
}

.background {
  background-color: var(--color-background) !important;
}
.bottom-line {
  border-bottom: var(--onepx) solid var(--color-line);
}
.top-line {
  border-top: var(--onepx) solid var(--color-line);
}

.card {
  margin-left: 20px;
  margin-right: 20px;
  background-color: var(--color-caption);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
  &:last-of-type {
    margin-bottom: 0px;
  }
}

.block {
  background-color: var(--color-caption);
  margin-bottom: 20px;
  &:last-of-type {
    margin-bottom: 0px;
  }
}

.font-mini {
  font-size: 24px;
}
@each $align in (left, center, right) {
  .text-#{$align} {
    text-align: #{$align};
  }

  @if $align != 'center' {
    .float-#{$align} {
      float: #{$align};
    }
  }
}
.clear::after {
  content: '';
  display: block;
  clear: both;
}

.pad {
  padding: 30px;
}
.pre {
  white-space: pre;
}

.wrap {
  word-break: break-all;
}

.nowrap {
  white-space: nowrap;
}

.flex {
  display: flex;

  @each $alignKey, $align in ('center': center, 'between': space-between, 'around': space-around, 'start': flex-start, 'end': flex-end) {
    &-#{$alignKey} {
      display: flex;
      justify-content: $align;
    }
  }
}

@each $alignKey, $align in ('center': center, 'start': flex-start, 'end': flex-end) {
  .al-#{$alignKey} {
    align-items: #{$align};
  }
}
.bold {
  font-weight: bold;
}

.text-del {
  text-decoration: line-through;
}

.grow {
  flex-grow: 2;
}

.shrink {
  flex-shrink: 0;
}

.pointer {
  cursor: pointer;
  user-select: none;
}

.mar-next + .mar-next {
  margin-top: 15px;
}

@mixin ellipsis {
  text-overflow: ellipsis;
}
.text-overflow {
  overflow: hidden;
  @include ellipsis;
  white-space: nowrap;
}

@mixin row {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  word-break: break-all;
  @include ellipsis;
}

@each $i in 1 to 5 {
  .row#{$i} {
    @include row;
    -webkit-line-clamp: #{$i};
  }
}
